<template>
	<view>
		<u-navbar
			title="温馨提示"
			:autoBack="true"
			placeholder
		>
		</u-navbar>
		<scroll-view :scroll-y="true" :style="{height: scrollViewHeight}">
			<view style="padding: 32rpx;">
				<u-empty
					:text="invalidMsg"
				    mode="data"
					icon="http://cdn.uviewui.com/uview/empty/data.png"
				>
				</u-empty>
				<view style="width: 200rpx;margin: 32rpx auto;">
					<u-button :color="appColor" text="返回" @click="back"></u-button>
				</view>
			</view>
		</scroll-view>
	</view>
</template>

<script>
	import {mapState} from 'vuex';
	export default {
		data() {
			return {
				invalidMsg: ''
			}
		},
		computed: {
			...mapState(['appInfo']),
			appColor() {
				return this.appPrimaryColor
			},
			scrollViewHeight() {
				return this.scrollHeight - 44 + 'px';
			}
		},
		methods: {
			back() {
				uni.navigateBack({
					delta: 1
				})
			}
		},
		onLoad({invalidMsg}) {
			this.invalidMsg = invalidMsg;
		}
	}
</script>

<style>
	page {
		background-color: #f5f5f5;
	}
</style>